<?php
global $_W, $_GPC;

$input = $_GPC['__input'];
$id = $_GPC['id'];

$item = pdo_get('iwe7_builder_forms', array('id' => $id));
$params = unserialize($item['paramas']);
$fields = unserialize($item['fields']);
$table = $item['table'];

$data = array();
$data['fields'] = $fields;
$data['list'] = pdo_getall($table);
die(json_encode($data));